package xgggh.activity;

import android.app.Application;
import rrrmai.di.component.ApplicationComponent;
import rrrmai.di.component.DaggerApplicationComponent;
import rrrmai.di.module.ApplicationModule;

/**
 * Created by az on 2018/3/23.
 */

public class DIApplication extends Application {
    private ApplicationComponent mApplicationComponent;

    @Override
    public void onCreate() {
        super.onCreate();
        createDIApplication();
    }

    private void createDIApplication(){
        mApplicationComponent=DaggerApplicationComponent
                .builder()
                .applicationModule(new ApplicationModule(this))
                .build();
    }

    public ApplicationComponent getmApplicationComponent() {
        return mApplicationComponent;
    }
}
